@extends('layouts.app')

@section('content')
    <div class="banner flex justify-center items-center">
        <span class="name">
            <img src="{{ asset('images/slogan.png') }}" alt="">
        </span>
        <span>
            <img src="{{ asset('images/show.png') }}" alt="">
        </span>
    </div>

    <div class="policy-service">
        <div class="title">
            <span class="text">政策服务</span>
        </div>

        <div class="tab flex justify-center flex-col">
            <div class="tab-tag-list flex justify-center items-center">
                <span class="tab-tag-item tab-tag-item-active">政策扶持</span>
                <span class="tab-tag-item">政策文件</span>
                <span class="tab-tag-item">政策解读</span>
            </div>

            <div class="tab-content flex flex-nowrap overflow-hidden">
                <div class="tab-item flex flex-col">
                    <div class="tab-body flex">
                        <div class="tab-main flex-shrink-0">
                            <a href="{{ route('policy.show', [$supports[0]['id']]) }}">
                                <img src="{{ asset($supports[0]['cover']) }}" alt="" class="tab-main-img">
                                <p class="tab-main-text">{{ $supports[0]['titile'] }}</p>
                            </a>
                        </div>
                        <div class="tab-list flex-col flex justify-between">
                            @for ($i = 1; $i <4; $i ++)
                            <div class="list-item">
                                <a href="{{ route('policy.show', [$supports[$i]['id']]) }}" class="flex">
                                    <div class="item-img flex-shrink-0">
                                        <img src="{{ asset($supports[$i]['cover']) }}" alt="">
                                    </div>
                                    <div class="item-info flex-col flex justify-around">
                                        <p class="item-title">{{ $supports[$i]['titile'] }}</p>
                                        <p class="item-time">{{ $supports[$i]['updated_at'] }}</p>
                                    </div>
                                </a>
                            </div>
                            @endfor
                        </div>
                    </div>
                    <div class="more">
                        <a href="{{ route('policy.index') }}">查看更多</a>
                    </div>
                </div>
                <div class="tab-item flex flex-col hidden">
                    <div class="tab-body flex">
                        <div class="tab-main flex-shrink-0">
                            <a href="{{ route('policy.show', [$files[0]['id']]) }}">
                                <img src="{{ asset($files[0]['cover']) }}" alt="" class="tab-main-img">
                                <p class="tab-main-text">{{ $files[0]['name'] }}</p>
                            </a>
                        </div>
                        <div class="tab-list flex-col flex justify-between">
                            @for ($i = 1; $i <4; $i ++)
                            <div class="list-item">
                                <a href="{{ route('policy.show', [$files[$i]['id']]) }}" class="flex">
                                    <div class="item-img flex-shrink-0">
                                        <img src="{{ asset($files[$i]['cover']) }}" alt="">
                                    </div>
                                    <div class="item-info flex-col flex justify-around">
                                        <p class="item-title">{{ $files[$i]['name'] }}</p>
                                        <p class="item-time">{{ $files[$i]['updated_at'] }}</p>
                                    </div>
                                </a>
                            </div>
                            @endfor
                        </div>
                    </div>
                    <div class="more">
                        <a href="{{ route('policy.file') }}">查看更多</a>
                    </div>
                </div>
                <div class="tab-item flex flex-col hidden">
                    <div class="tab-body flex">
                        <div class="tab-main flex-shrink-0">
                            <a href="{{ route('policy.show', [$interpretations[0]['id']]) }}">
                                <img src="{{ asset($interpretations[0]['cover']) }}" alt="" class="tab-main-img">
                                <p class="tab-main-text">{{ $interpretations[0]['title'] }}</p>
                            </a>
                        </div>
                        <div class="tab-list flex-col flex justify-between">
                            @for ($i = 1; $i <4; $i ++)
                            <div class="list-item">
                                <a href="{{ route('policy.show', [$interpretations[$i]['id']]) }}" class="flex">
                                    <div class="item-img flex-shrink-0">
                                        <img src="{{ asset($interpretations[$i]['cover']) }}" alt="">
                                    </div>
                                    <div class="item-info flex-col flex justify-around">
                                        <p class="item-title">{{ $interpretations[$i]['title'] }}</p>
                                        <p class="item-time">{{ $interpretations[$i]['updated_at'] }}</p>
                                    </div>
                                </a>
                            </div>
                            @endfor
                        </div>
                    </div>
                    <div class="more">
                        <a href="{{ route('policy.interpretation') }}">查看更多</a>
                    </div>
                </div>
            </div>
        </div>
    </div>

    <div class="financial-services">
        <div class="title">
            <span class="text">金融服务</span>
        </div>

        <div class="flex justify-between mt-8">
            <div class="financial-news">
                <div class="financial-title">
                    <span class="text">金融新闻</span>
                    <span class="more">
                        <a href="{{ route('financial.index') }}">更多</a>
                    </span>
                </div>
                <div class="financial-list">
                    <ul>
                        @foreach ($financialNews as $news)
                            <li class="financial-item">
                                <a href="{{ route('financial.show', [$news['id']]) }}">{{ $news['title'] }}</a>
                            </li>
                        @endforeach
                    </ul>
                </div>
            </div>

            <div class="investment-guide">
                <div class="financial-title">
                    <span class="text">投资指南</span>
                    <span class="more">
                        <a href="{{ route('financial.guide') }}">更多</a>
                    </span>
                </div>

                <div class="invsetment-list">
                    <ul>
                        @foreach ($investmentGuide as $guide)
                            <li class="investment-item">
                                <a href="{{ route('financial.guide.show', [$guide['id']]) }}">{{ $guide['title'] }}</a>
                            </li>
                        @endforeach
                    </ul>
                </div>
            </div>
        </div>

    </div>

    <div class="legal-services">
        <div class="title">
            <span class="text">法律服务</span>
        </div>

        <div class="flex justify-center">
            <p class="case-show">案例展示</p>
        </div>

        <div class="legal-content">
            <div class="type-list flex justify-center items-center">
                <a href="{{ route('legal.index') }}" class="type-item property">
                    <img src="{{ asset('images/property.png') }}" alt="">
                    <span>财产纠纷案</span>
                </a>
                <a href="{{ route('legal.index') }}" class="type-item contract">
                    <img src="{{ asset('images/contract.png') }}" alt="">
                    <span>合同纠纷案</span>
                </a>
                <a href="{{ route('legal.index') }}" class="type-item labor">
                    <img src="{{ asset('images/lador.png') }}" alt="">
                    <span>劳动纠纷案</span>
                </a>
            </div>
        </div>
    </div>

    <div class="startup-hub">
        <div class="title mb-10">
            <span class="text">创业园区</span>
        </div>

        <div class="hub-content flex justify-between">
            <div class="hub-intro items-center">
                <div class="intro">
                    <p class="intro-title">园区简介</p>
                    <p class="intro-text">智慧汉台数字经济产业园是依托于智慧汉台 PPP 项目和智慧大厦建设项目而建的数字创新示范，运营模式示范，功能协同……</p>
                    <span class="intro-more">
                        <a href="{{ route('hub.index') }}">查看更多</a>
                    </span>
                </div>
                <div class="intro-img">
                    <img src="{{ asset('images/building.png') }}" alt="">
                </div>
            </div>

            <div class="hub-item flex flex-col justify-between">
                <div class="apply flex justify-center items-center">
                    <span>
                        <a class="apply-btn" href="/">申请入孵</a>
                    </span>
                </div>
                <div class="items flex flex-col justify-between">
                    <div class="item-list flex justify-between">
                        <div class="compay-item">
                            <a href="{{ route('hub.rf') }}">
                            <img src="{{ asset('images/lg1.png') }}" alt=""></a>
                        </div>
                        <div class="compay-item">
                            <a href="{{ route('hub.rf') }}">
                            <img src="{{ asset('images/lg2.png') }}" alt=""></a>
                        </div>
                        <div class="compay-item">
                            <a href="{{ route('hub.rf') }}">
                            <img src="{{ asset('images/lg3.png') }}" alt=""></a>
                        </div>
                    </div>
                    <div class="item-list flex justify-between">
                        <div class="compay-item">
                            <a href="{{ route('hub.rf') }}">
                            <img src="{{ asset('images/lg4.png') }}" alt=""></a>
                        </div>
                        <div class="compay-item">
                            <a href="{{ route('hub.rf') }}">
                            <img src="{{ asset('images/lg5.png') }}" alt=""></a>
                        </div>
                        <div class="compay-item">
                            <a href="{{ route('hub.rf') }}">
                            <img src="{{ asset('images/lg6.png') }}" alt=""></a>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>

    <div class="training-services">
        <div class="title mb-10">
            <span class="text">培训服务</span>
        </div>

        <div class="traning-content flex justify-between items-center">
            <div class="traning-prev">
                <span><</span>
            </div>
            <div class="training-list flex justify-between items-center">
                @foreach ($activites as $active)
                    <div class="training-item">
                        <a href="{{ route('training.show', [$active['id']]) }}">
                            <img src="{{ asset($active['cover']) }}" alt="">
                            <p>{{ $active['title'] }}</p>
                        </a>
                    </div>
                @endforeach
                {{-- <div class="training-item">
                    <img src="{{ asset('images/tr2.png') }}" alt="">
                    <p>关于《财务管理高级研修班》（第一期）的通知</p>
                </div>
                <div class="training-item">
                    <img src="{{ asset('images/tr3.png') }}" alt="">
                    <p>关于《财务管理高级研修班》（第一期）的通知</p>
                </div>
                <div class="training-item">
                    <img src="{{ asset('images/tr4.png') }}" alt="">
                    <p>关于《财务管理高级研修班》（第一期）的通知</p>
                </div> --}}
            </div>
            <div class="traning-next">
                <span>></span>
            </div>
        </div>
    </div>

@stop

@section('script')
<script>
    $(document).ready(function () {

        $('.tab-tag-item').click(function () {
            var itemIndex = $(this).index()
            $('.tab-tag-item').removeClass('tab-tag-item-active')
            $(this).addClass('tab-tag-item-active')
            $('.tab-item').addClass('hidden')
            $('.tab-item').eq(itemIndex).removeClass('hidden')
        })
    })
</script>
@stop
